<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.0.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$("#login").click(function(){
			var id=$("#id").val();
			var password=$("#password").val();
			if(id==""){
				alert("아이디를 입력해주세요");
				return;
			}else if(password==""){
				alert("비밀번호를 입력해주세요");
				return;
			}
			$("#loginForm").submit();
		});
	});
</script>
</head>
<body>
<%-- <form action="${initParam.root}login.ju" method="post" id="loginForm">
       <table style="border: 1px dashed #aaaaaa; width: 380px;" cellpadding="0" cellspacing="0" align="center">
        <h2 align="center"><br>로그인 <br><br></h2>
        
        <tr height="45">
    
         <td width="140" align="center">아이디</td>
         <td><input type="text"  size="20" id="id" name="id"></td>
       </tr>
 

       <tr height="45">
         <td align="center">비밀번호</td>
         <td><input type="password"  id="password" size="20" name="password" ></td>
        </tr>

         <tr align="center" style="background-color: #ccc;">
         <td colspan="3" height="30">
         <input type="button" value="로그인" id="login"></td>
        </tr>
       </table>
  </form>--%>
  <form class="form-horizontal" role="form" action="${initParam.root}login.ju" method="post" id="loginForm">
    <div class="form-group">
        <label class="col-sm-1 col-sm-offset-3 control-label"></label>
        <div class="col-sm-5">
            <input type="text" placeholder="UserID" class="form-control"  id="id" name="id"/>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-1 col-sm-offset-3 control-label"></label>
        <div class="col-sm-5">
            <input type="password" placeholder="UserPassword" class="form-control" id="password" name="password"/>
        </div>
    </div>

    <br/>
          <div class="form-group">
    <label class="col-sm-1 col-sm-offset-3 control-label"></label>
    <div class="col-sm-5" class="form-control">
      <button type="submit" class="btn btn-default" id="login">로그인</button>
      </div>
    </div>
</form>
</body>
</html>